<template>
	<view class="content">
		<view class="ipts">
			<view class="record">
				<image src="/static/jilu.png" mode=""></image>
				<span>用户信息</span>
			</view>
			<!-- 户号 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>户号</span>
				</view>
				<span class="place-class">{{d.member_text.meter_num}}</span>
			</view>
			<view class="hengxian"></view>
			<!-- 户主姓名 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>户主姓名</span>
				</view>
				<span class="place-class">{{d.member_text.realname}}</span>
			</view>
			<view class="hengxian"></view>
			<!-- 身份证号 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>身份证号</span>
				</view>
				<span class="place-class">{{d.member_text.ID_num}}</span>
			</view>
			<view class="hengxian"></view>
			<!-- 联系方式 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>联系方式</span>
				</view>
				<span class="place-class">{{d.member_text.mobile}}</span>
			</view>
			<view class="hengxian"></view>
			<!-- 地址 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>地址</span>
				</view>
				<span class="place-class">{{d.member_text.address}}</span>
			</view>
		</view>
		<!-- 第二块 -->
		<view class="ipts">
			<!-- 品牌 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>品牌</span>
				</view>
				<view class="place-class">
					{{d.brand}}
				</view>
			</view>
			<view class="hengxian"></view>
			<!-- 实际功率 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>实际功率</span>
				</view>
				<view class="place-class">
					{{d.power}}
				</view>
			</view>
			<view class="hengxian"></view>
			<!-- 气表号 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>气表号</span>
				</view>
				<span class="place-class">{{d.member_text.meter_num}}</span>
			</view>
			<view class="hengxian"></view>
			<!-- 气表底数 -->
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>气表底数</span>
				</view>
				<span class="place-class">{{d.meter_base_num}}</span>
			</view>
			<view class="hengxian"></view>

			<view class="info-item" v-if="d.qibiao_img">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>燃气表</span>
				</view>
				<view class="danger-img-box">
					<view class="danger-img">
						<image :src="d.qibiao_img" @tap="seeimg(d.qibiao_img)" mode=""></image>
					</view>
				</view>
			</view>
			<view class="hengxian"></view>

			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>燃气火点</span>
				</view>
				<view class="danger-img-box">
					<view class="danger-img" v-if="d.meter_image_url.dianhuo_img_1.url">
						<image :src="d.meter_image_url.dianhuo_img_1.url" @tap="seeimg(d.meter_image_url.dianhuo_img_1.url)" mode=""></image>
					</view>
				</view>
			</view>
			<view class="hengxian"></view>

			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>资料</span>
				</view>
				<view class="danger-img-box2">
					<view class="danger-img" v-if="d.meter_image_url.qimi_img_1.url">
						<image :src="d.meter_image_url.qimi_img_1.url" @tap="seeimg(d.meter_image_url.qimi_img_1.url)" mode=""></image>
					</view>
				</view>
			</view>
			<view class="hengxian"></view>
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>其他</span>
				</view>
				<view class="danger-img-box">
					<view class="danger-img">
						<image :src="d.success_img" @tap="seeimg(d.success_img)" mode=""></image>
					</view>
				</view>
			</view>
			<view class="hengxian"></view>
			<view class="supplement">
				<view class="info-item">
					<view class="info-item-left">
						<view class="dot"></view>
						<span>备注</span>
					</view>
				</view>
				<view class="explain">
					<textarea disabled v-model="d.mark" maxlength="200"  auto-height  class="textArea"/>
				</view>
			</view>
		</view>
		<!-- 上次安检时间 -->
		<view class="ipts">
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>是否安检</span>
				</view>
				<view class="danger-img-box">
					<switch disabled :checked="d.is_receive==1 ? true:false" style="transform:scale(0.7)" />
				</view>
			</view>
			<view class="hengxian"></view>
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>是否签收《居民用气安全检查结果通知书》</span>
				</view>
				<view class="danger-img-box">
					<view class="danger-img-box">
						<switch disabled :checked="d.is_safe==1 ? true:false" style="transform:scale(0.7)" />
					</view>
				</view>
			</view>
			<view class="hengxian"></view>
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>是否派发安全宣传资料</span>
				</view>
				<view class="danger-img-box">
					<view class="danger-img-box">
						<switch disabled :checked="d.security==1 ? true:false" style="transform:scale(0.7)" />
					</view>
				</view>
			</view>
			<view class="hengxian"></view>
			<view class="info-item">
				<view class="info-item-left">
					<view class="dot"></view>
					<span>电子签名</span>
				</view>
				<view class="danger-img-box2">
					<view class="danger-img">
						<image :src="d.sign" @tap="seeimg(d.sign)" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import cpimg from "@/components/cpimg/cpimg.vue"
	import easySelect from '@/components/easy-select/easy-select'
	export default {
		components: {
			easySelect,
			cpimg
		},
		data() {
			return {
				d:{},  //详情数据
			}
		},
		onShow() {

		},
		onLoad(e) {
			// this.searNum(e)
			// this.token = e.token
			this.getDetails(e.id)
		},
		methods: {
			getDetails(id){
				var _this = this
				uni.request({
					url:_this.$api + '/staff/details',
					method:'GET',
					data:{
						id: id
					},
					success: (res) => {
						if(res.data.code == 0){
							return _this.$showToast(res.data.msg)
						}
						_this.d =res.data.data
					}
				})
			},
			seeimg(img){
				uni.previewImage({
					urls:[img],
					current:0
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #F1F1F1;
		padding-bottom: 100rpx;

		.header {
			display: flex;
			justify-content: space-between;
			align-items: center;
			// padding: 30rpx 30rpx;
			background-color: #F1F1F1;

			.header-right {
				display: flex;
				align-items: center;
				font-size: 24rpx;
				color: #333;
				// margin-right: 20rpx;
				padding: 10rpx 30rpx;

				image {
					width: 32rpx;
					height: 32rpx;
					margin-right: 10rpx;
				}
			}
		}

		.header1 {
			display: flex;
			align-items: center;
			box-sizing: border-box;
			height: 80rpx;
			width: 100%;
			background-color: #003690;
			padding: 0 30rpx;

			.ipt-box {
				display: flex;
				justify-content: space-between;
				align-items: center;
				box-sizing: border-box;
				padding: 0 20rpx;
				width: 450rpx;
				height: 52rpx;
				background-color: #fff;
				border-radius: 24rpx;

				image {
					width: 32rpx;
					height: 32rpx;
				}
			}

			.header1-right {
				display: flex;
				align-items: center;
				font-size: 28rpx;
				color: #E2ECFB;
				flex: 1;
				justify-content: center;

				image {
					width: 36rpx;
					height: 36rpx;
				}
			}
		}

		.newstyle {
			background: #003690;
			color: #FFFFFF;
		}



		.btns {
			position: fixed;
			bottom: 0;
			display: flex;
			width: 100%;
			z-index: 333;

			.btn1 {
				width: 50%;
				height: 96rpx;
				line-height: 96rpx;
				text-align: center;
				font-size: 24rpx;
			}

			.consel {
				background-color: #e9e9e9;
				color: #777;
			}

			.save {
				background-color: #003690;
				color: #fff;
			}
		}

		.btn:active {
			background: rgba(0, 0, 0, 0.4);
		}

		.zhanwei {
			height: 250rpx;
		}

		.ipts {
			background-color: #fff;
			margin-bottom: 20rpx;
		}

		.info-item {
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-between;
			// height: 72rpx;
			width: 100%;
			padding: 10rpx 30rpx;
			background-color: #fff;
			font-size: 24rpx;
			color: #333;

			image {
				width: 32rpx;
				height: 32rpx;
			}

			input {
				flex: 1;
				text-align: right;
			}

			.dot {
				width: 8rpx;
				height: 8rpx;
				background-color: #003690;
				border-radius: 50%;
				margin-right: 10rpx;
			}

			.danger-img {
				position: relative;

				.updeletes {
					position: absolute;
					top: -20rpx;
					right: -20rpx;
					width: 40rpx;
					height: 40rpx;
					z-index: 88;

					image {
						width: 100%;
						height: 100%;
					}
				}
			}

			.danger-img-box {
				display: flex;

				.danger-img {
					width: 75rpx;
					height: 75rpx;
					// border: 2rpx dashed #eee;
					margin-right: 10rpx;


					image {
						width: 100%;
						height: 100%;
					}
				}
			}

			.danger-img-box2 {
				display: flex;

				.danger-img {
					width: 75rpx;
					height: 75rpx;
					// border: 2rpx dashed #eee;
					margin-right: 10rpx;

					image {
						width: 100%;
						height: 100%;
						opacity: 1;
					}
				}
			}

			.info-item-left {
				display: flex;
				align-items: center;
				font-size: 32rpx;
			}
		}

		.hengxian {
			width: 700rpx;
			height: 2rpx;
			background-color: #eee;
			margin: 20rpx auto;
		}

		.place-class {
			font-size: 26rpx;
			color: #999;
		}

		.btn {
			width: 646rpx;
			height: 80rpx;
			margin: 74rpx auto;
			text-align: center;
			line-height: 80rpx;
			border-radius: 40rpx;
			background-image: linear-gradient(to bottom, #2366D5, #001B48);
			font-size: 32rpx;
			color: #E5EFFE;
		}

		.btns {
			position: fixed;
			bottom: 0;
			display: flex;
			width: 100%;
			z-index: 333;

			.btn1 {
				width: 50%;
				height: 96rpx;
				line-height: 96rpx;
				text-align: center;
				font-size: 24rpx;
			}

			.consel {
				background-color: #e9e9e9;
				color: #777;
			}

			.save {
				background-color: #003690;
				color: #fff;
			}
		}

		.btn:active {
			background: rgba(0, 0, 0, 0.4);
		}

		.zhanwei {
			height: 250rpx;
		}

		.record {
			display: flex;
			align-items: center;
			// justify-content: space-between;
			color: #003690;
			font-size: 32rpx;
			padding: 20rpx;

			// margin-top: 20rpx;
			image {
				width: 32rpx;
				height: 32rpx;
				margin: 0 20rpx 0 30rpx;
			}
		}

		.record-item {
			display: flex;
			justify-content: space-between;
			padding: 10rpx 30rpx;
			border-bottom: 2rpx solid #eee;

			.record-item-left {
				display: flex;
				align-items: center;

				.shu {
					width: 8rpx;
					height: 28rpx;
					background-color: #003690;
					border-radius: 8rpx;
				}

				.title {
					font-size: 32rpx;
					color: #333;
					font-weight: 500;
					margin: 0 10rpx;
				}

				.time {
					font-size: 24rpx;
					color: #777;
				}
			}

			.record-item-right {
				display: flex;
				align-items: center;

				.dianhua {
					width: 28rpx;
					height: 28rpx;
				}

				.zhankai {
					width: 36rpx;
					height: 36rpx;
				}

				.title {
					font-size: 32rpx;
					color: #555;
					font-weight: 500;
					margin: 0 10rpx;
				}
			}
		}

		.supplement {
			margin: 20rpx 24rpx;
			background-color: #fff;
			position: relative;
			overflow: hidden;

			.explain {
				.textArea {
					min-height: 142rpx;
					padding: 14rpx 30rpx;
					font-size: 32rpx;
					text-align: left;
					color: #000000;
				}
			}

			.suppBottom {
				.danger-img {
					position: relative;
					margin-left: 50rpx;
					margin-bottom: 0rpx;
					width: 68rpx;
					height: 68rpx;
					float: left;

					image {
						width: 36rpx;
						height: 36rpx;
						position: absolute;
						left: 50%;
						top: 50%;
						transform: translate(-50%, -50%);
					}
				}

				.num {
					float: right;
					margin-right: 26rpx;
				}
			}
		}
	}
</style>
